#include "IntroState.h"
#include "PlayState.h"
#include "Texture.h"
#include "PlayState.h"
#include "ResMgr.h"
#include "StateMgr.h"
#include "MainMenuState.h"
#include "TimeController.h"

IntroState::IntroState()
{
}

void IntroState::Init()
{
	ResMgr::GetInstance()->LoadIntro();
	waitNextState = 0;
}

void IntroState::Update(){
	waitNextState += TimeController::GetInstance()->GetDtInSecond();
	if(waitNextState > 1)
		StateMgr::GetInstance()->SwitchState(new MainMenuState());
}
void IntroState::Render()
{
	ResMgr::GetInstance()->GetTexture(TID_INTRO_BACK)->Render(0, 0);
}

void IntroState::TouchDown(int x, int y)
{
}

IntroState::~IntroState()
{
	ResMgr::GetInstance()->UnloadIntro();
}